package cn.itcast.day08.demo07;

public class DemoGame {
    public static void main(String[] args) {
        Hero hero = new Hero();
        hero.setName("艾希");
        hero.setSkill(new SkillImpl());
        hero.attack();
        System.out.println("==================");
        hero.setSkill(new Skill() {
            @Override
            public void use() {
                System.out.println("相位猛冲+猛牛冲撞");
            }
        });
        hero.attack();
    }
}
